
'use strict';
const fs = require("fs");
var en = require("./encrypt");
var args = process.argv.splice(2);
var cryptLength = 0;

require.extensions[".jse"] = function(module, filename) {
   var data = fs.readFileSync(filename, 'utf8');
   data =  en.decrypt(data, args[1], args[2]);
   module._compile(data, filename);
   cryptLength ++;
   if (cryptLength == args[0]) {
     process.argv = []
     args = []
   }
}
